#ifndef __M_AUDIO_H__
#define __M_AUDIO_H__

typedef int (*VitaAudioCallback)(void *buf, unsigned int samples, void *userdata);

size_t retroAudioSampleBatchCallback(const int16_t *data, size_t frames);
int vitaAudioCallback(void *buf, unsigned int samples, void *userdata);

void vitaAudioResetBuffers();
void vitaAudioPause();
void vitaAudioResume();
int vitaAudioInit();
int vitaAudioShutdown();

void vitaAudioSetVolume(int channel, int left, int right);
int vitaAudioSetFrequency(int channel, int samples, unsigned short freq, int stereo);
int vitaAudioResetFrequency(uint32_t sample_rate);
void vitaAudioSetChannelCallback(int channel, VitaAudioCallback callback, void *userdata);
void vitaAudioResetBuffers();

#endif
